﻿<UserControl x:Class="VKontakteClient.FullProfileControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Local="clr-namespace:VKontakteClient">
    <UserControl.Resources>
        <Local:DateConverter x:Key="LDateConverter" />
        <Local:GenderConverter x:Key="LGenderConverter" />
        <Local:IsNullToIntConverter x:Key="IsNullToIntConverter" />
        <Local:RelationConverter x:Key="LRelationConverter" />
    </UserControl.Resources>
    <Border CornerRadius="5" BorderBrush="Black" BorderThickness="1" Background="AliceBlue" MinHeight="500" MinWidth="600">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="220"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Vertical" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10">
                <Border CornerRadius="2" BorderBrush="Gray" BorderThickness="1" Width="200" >
                    <Image Source="{Binding Path=Photo.Uri}" />
                </Border>
                <Button Content="Друзья" Margin="5" Click="Button_Click">
                    <Button.Background>
                        <LinearGradientBrush>
                            <LinearGradientBrush.RelativeTransform>
                                <RotateTransform Angle="90" />
                            </LinearGradientBrush.RelativeTransform>
                            <LinearGradientBrush.GradientStops>
                                <GradientStopCollection>
                                    <GradientStop Color="White" Offset="0" />
                                    <GradientStop Color="DarkCyan" Offset="1" />
                                </GradientStopCollection>
                            </LinearGradientBrush.GradientStops>
                        </LinearGradientBrush>
                    </Button.Background>
                </Button>
                <Expander Header="Друзья онлайн (в разработке)" IsExpanded="True" IsEnabled="False"></Expander>
                <Expander Header="Фотографии (в разработке)" IsExpanded="True" IsEnabled="False"></Expander>
                <Expander Header="Видео (в разработке)" IsExpanded="True" IsEnabled="False"></Expander>
                <Expander Header="Группы (в разработке)" IsExpanded="True" IsEnabled="False"></Expander>

            </StackPanel>
            <ScrollViewer Grid.Column="1" Margin="10" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                <StackPanel Orientation="Vertical" >
                    <StackPanel Orientation="Horizontal">
                        <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Text="{Binding Mode=OneWay}" Margin="5" />
                        <!--<TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Text="{Binding Path=NickName}" Margin="5"/>
                        <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Text="{Binding Path=LastName}" Margin="5" />-->
                    </StackPanel>
                    <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Text="{Binding Path=Status}" Margin="2" />
                    <Grid HorizontalAlignment="Left">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition MinWidth="160"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="{Binding Path=Gender, Converter={StaticResource IsNullToIntConverter}}"/>
                            <RowDefinition Height="{Binding Path=Relation, Converter={StaticResource IsNullToIntConverter}}"/>
                            <RowDefinition Height="{Binding Path=BirthDay, Converter={StaticResource IsNullToIntConverter}}"/>
                            <RowDefinition Height="{Binding Path=HomeCity, Converter={StaticResource IsNullToIntConverter}}"/>
                            <RowDefinition Height="{Binding Path=Politic, Converter={StaticResource IsNullToIntConverter}}"/>
                            <RowDefinition Height="{Binding Path=Religion, Converter={StaticResource IsNullToIntConverter}}"/>
                        </Grid.RowDefinitions>
                        <TextBlock Text="Пол: " Grid.Row="0" Margin="3" />
                        <TextBlock Text="Семейное положение: " Margin="3"  Grid.Row="1" />
                        <TextBlock Text="День рождения: " Margin="3" Grid.Row="2" />
                        <TextBlock Text="Родной город: " Margin="3" Grid.Row="3" />
                        <TextBlock Text="Полит. взгляды: " Margin="3" Grid.Row="4" />
                        <TextBlock Text="Религ. взгляды: " Margin="3" Grid.Row="5" />

                        <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3"  Text="{Binding Path=Gender, Converter={StaticResource LGenderConverter}}" Grid.Column="1" Grid.Row="0" />
                        <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Grid.Column="1" Grid.Row="1" >
                            <TextBox.Text>
                                <MultiBinding Converter="{StaticResource LRelationConverter}">
                                    <Binding Path="Relation" />
                                    <Binding Path="Gender" />
                                </MultiBinding>
                            </TextBox.Text>
                        </TextBox>
                        <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Text="{Binding Path=BirthDay, Converter={StaticResource LDateConverter}}" Grid.Column="1" Grid.Row="2" />
                        <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Text="{Binding Path=HomeCity}" Grid.Column="1" Grid.Row="3" />
                        <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Text="{Binding Path=Politic}" Grid.Column="1" Grid.Row="4" />
                        <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Text="{Binding Path=Religion}" Grid.Column="1" Grid.Row="5" />
                    </Grid>

                    <Expander Header="Информация" IsExpanded="True" HorizontalAlignment="Stretch">
                        <Expander.Content>
                            <Grid HorizontalAlignment="Stretch">
                                <TextBlock Margin="3" Grid.ColumnSpan="2" Text="Контактная информация" TextBlock.FontWeight="Bold" TextBlock.Foreground="#36638e" />
                                <TextBlock Margin="3" Grid.Row="1" Text="Моб. телефон:" />
                                <TextBlock Margin="3" Grid.Row="2" Text="Дом. телефон:" />
                                <TextBlock Margin="3" Grid.Row="3" Text="ICQ:" />
                                <TextBlock Margin="3" Grid.Row="4" Text="Веб-сайт:" />
                                <TextBlock Margin="3" Grid.Row="5" Text="Никнейм:" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Grid.Column="1" Grid.Row="1" Text="{Binding Path=MobilePhone}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Grid.Column="1" Grid.Row="2" Text="{Binding Path=HomePhone}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Grid.Column="1" Grid.Row="3" Text="{Binding Path=ICQ}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Margin="3" Grid.Column="1" Grid.Row="4" Text="{Binding Path=PersonalSite}" />
                                <StackPanel Margin="3" Grid.Column="1" Grid.Row="5"  Orientation="Horizontal" >
                                    <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Text="{Binding Path=ForumNickname[0]}" />
                                    <TextBlock Text=" " />
                                    <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" Text="{Binding Path=ForumNickname[1]}" />
                                </StackPanel>
                                <Separator Grid.ColumnSpan="2" Grid.Row="6"/>
                                <TextBlock Margin="3" Grid.ColumnSpan="2" Grid.Row="7" Text="Личная информация" TextBlock.FontWeight="Bold" TextBlock.Foreground="#36638e" />
                                <TextBlock Margin="3" Grid.Row="8" Grid.Column="0" Text="Деятельность:" />
                                <TextBlock Margin="3" Grid.Row="9" Grid.Column="0" Text="Интересы:" />
                                <TextBlock Margin="3" Grid.Row="10" Grid.Column="0" Text="Любимая музыка:" />
                                <TextBlock Margin="3" Grid.Row="11" Grid.Column="0" Text="Любимые фильмы:" />
                                <TextBlock Margin="3" Grid.Row="12" Grid.Column="0" Text="Любимые телешоу:" />
                                <TextBlock Margin="3" Grid.Row="13" Grid.Column="0" Text="Любимые книги:" />
                                <TextBlock Margin="3" Grid.Row="14" Grid.Column="0" Text="Любимые игры:" />
                                <TextBlock Margin="3" Grid.Row="15" Grid.Column="0" Text="Любимые цитаты:" />
                                <TextBlock Margin="3" Grid.Row="16" Grid.Column="0" Text="О себе:" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="8" Grid.Column="1" Text="{Binding Path=Occupy}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="9" Grid.Column="1" Text="{Binding Path=Interests}"/>
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="10" Grid.Column="1" Text="{Binding Path=FavoriteMusic}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="11" Grid.Column="1" Text="{Binding Path=FavoriteFilms}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="12" Grid.Column="1" Text="{Binding Path=FavoriteTV}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="13" Grid.Column="1" Text="{Binding Path=FavoriteBooks}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="14" Grid.Column="1" Text="{Binding Path=FavoriteGames}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="15" Grid.Column="1" Text="{Binding Path=FavoriteQuotes}" />
                                <TextBox IsReadOnly="True" Background="Transparent" BorderThickness="0" TextWrapping="WrapWithOverflow" Margin="3" Grid.Row="16" Grid.Column="1" Text="{Binding Path=About}" />
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="160"/>
                                    <ColumnDefinition Width="280"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                    <RowDefinition Height="{Binding Path=MobilePhone, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=HomePhone, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=ICQ, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=PersonalSite, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=ForumNickname, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition/>
                                    <RowDefinition/>
                                    <RowDefinition Height="{Binding Path=Occupy, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=Interests, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=FavoriteMusic, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=FavoriteFilms, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=FavoriteTV, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=FavoriteBooks, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=FavoriteGames, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=FavoriteQuotes, Converter={StaticResource IsNullToIntConverter}}"/>
                                    <RowDefinition Height="{Binding Path=About, Converter={StaticResource IsNullToIntConverter}}"/>
                                </Grid.RowDefinitions>
                            </Grid>
                        </Expander.Content>
                    </Expander>
                    <Expander Header="Образование (в разработке)" IsExpanded="True" IsEnabled="False"></Expander>
                    <Expander Header="Карьера (в разработке)" IsExpanded="True" IsEnabled="False"></Expander>
                    <Button Content="Аудиозаписи" Click="Button_Click_1" Margin="2" HorizontalAlignment="Center" MinWidth="140">
                        <Button.Background>
                            <LinearGradientBrush>
                                <LinearGradientBrush.RelativeTransform>
                                    <RotateTransform Angle="90" />
                                </LinearGradientBrush.RelativeTransform>
                                <LinearGradientBrush.GradientStops>
                                    <GradientStopCollection>
                                        <GradientStop Color="White" Offset="0" />
                                        <GradientStop Color="DarkCyan" Offset="1" />
                                    </GradientStopCollection>
                                </LinearGradientBrush.GradientStops>
                            </LinearGradientBrush>
                        </Button.Background>
                    </Button>
                    <Expander Header="Подарки (в разработке)" IsExpanded="True" IsEnabled="False"></Expander>
                    <Expander Header="Стена (в разработке)" IsExpanded="True" IsEnabled="False"></Expander>

                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Border>
</UserControl>
